

import java.io.Serializable;

/**
 * @author Yiyao Wu
 *
 */
/**
 * Message class, contains destination, id, kind and the content.
 * functions of getting them are provided.
 */
public class Message implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String source;
	private String dest;
	private String kind;
	private String id;
	private int rtt=1;
	private int[] seqnum;
	public int[] getSeqnum() {
		return seqnum;
	}
	public void setSeqnum(int[] seqnum) {
		this.seqnum = seqnum;
	}
	private Object content;
	
	public Message(String source,String dest, String kind, String id, Object data)
	{
		this.source=source;
		this.dest=dest;
		this.kind=kind;
		this.id=id;
		this.content=data;
	}
	public String getsource(){return source;}
	public String getdest(){return dest;}
	public String getkind(){return kind;}
	public String getid(){return id;}
	public Object getcontent(){return content;}
	public String toString()
	{
		return "Source is" + source + "destination is " + dest + "content is " + (String)content;
	}
}
